package com.guigu.qingcheng.controller;

import com.guigu.qingcheng.pojo.AuditSpuInfo;
import com.guigu.qingcheng.service.AuditSpuInfoService;
import com.guigu.qingcheng.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/audit")
public class AuditSpuInfoController {
    @Autowired
    private AuditSpuInfoService auditSpuInfoService;

    @GetMapping("queryBySkuId/{id}")
    public R queryBySkuId(@PathVariable String id){
        List<AuditSpuInfo> auditSpuInfos = auditSpuInfoService.queryBySkuId(id);
        return R.ok().message("查询成功").data("audit", auditSpuInfos);
    }
}
